package com.example.hyw.szysteam.arithmetic;

import java.util.ArrayList;

/**
 * Created by HYW on 2018/6/11.
 */

public class Check {
    ArrayList<Object> check=new ArrayList<Object>();
    int answer=1;
    int RPN=1;
    public boolean checkAnswer(MyNumber result){
        if(result.getNumerator()*result.getDenominator()>=0){
            return true;
        }else {
            return false;
        }
    }

    public boolean checkRPN(String list){
        if(check.size()==0){
            check.add(list);
            return true;
        }else {
            for (int i=0;i<check.size();i++){
                if(check.get(i).equals(list)){
                    return false;
                }
            }
        }
        check.add(list);
        return true;
    }
}
